From: everyx Date: Sat, 13 Sep 2025 04:01:17 +0000 (+0800) Subject: messageTray: Fix race condition causing stuck notification banners X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~95^2^2~9 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=93a79cf61b2b404357e6f637cc9e7f324fb27a69;p=gnome-shell.git messageTray: Fix race condition causing stuck notification banners A race condition can occur where a notification banner gets stuck on screen and never disappears. This happens when a new notification needs to be shown while an old one is in the middle of its hiding animation. The process to show the new notification calls `remove_all_transitions()`, which forcefully stops the hiding animation of the old one. The cleanup logic, which destroys the old banner actor, was located in the `onComplete` handler of the animation. Since the animation was interrupted and not completed, this handler was never called, leaving a "zombie" banner on screen. To fix this, the call to the cleanup function is moved from the `onComplete` handler to an `onStopped` handler. This handler is guaranteed to be called whenever an animation stops, regardless of whether it finished successfully or was interrupted. This ensures the banner is always cleaned up correctly. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6006 Part-of: --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index cbc006478..64213c411 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -1255,7 +1255,7 @@ export const MessageTray = GObject.registerClass({ y: -this._bannerBin.height, duration, mode: Clutter.AnimationMode.EASE_OUT_BACK, - onComplete: () => { + onStopped: () => { this._notificationState = State.HIDDEN; this._hideNotificationCompleted(); this._updateState();